package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.ArticleDictionary;
import com.caigou.bean.cms.param.CommonParam;
import com.caigou.bean.vo.ChannelStatusVO;
import com.caigou.pojo.DictionaryList;
import com.caigou.pojo.LawLevelDictionaryList;
import com.caigou.pojo.TitleDictionaryList;
import com.caigou.util.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository("ArticleDictionaryMapper")
public interface ArticleDictionaryMapper {
    String loadDictionary(@Param("value") Integer value, @Param("type") Integer type);

    List<DictionaryList> loadDictionaryList(CommonParam param);

    List<TitleDictionaryList> loadTitleDictionaryList(CommonParam param);

    List<LawLevelDictionaryList> loadLawLevelDictionaryList();

    List<ArticleDictionary> loadChannelsBySuperIdAndType(@Param("superId") Integer superId, @Param("type") Integer type);

    List<ArticleDictionary> findAllChannelSectionDictionaryList();

    List<ArticleDictionary> findAllChannelDictionaryList();

    List<ArticleDictionary> findAllSectionDictionaryByValues(@Param("values") List<Integer> values);

    List<ChannelStatusVO> findChannelSectionStatus(@Param("keyword") String keyword);

    List<ArticleDictionary> findSectionDictionaryByLevel(Integer level);

    ArticleDictionary findDictionaryByTypeAndValueAndLevel(Integer type, Integer section, Integer level);

    int updateByPrimaryKeySelective(ChannelStatusVO record);

    List<ArticleDictionary> findAllChannelSectionList();

    ArticleDictionary loadDictionaryByTitleType(@Param("titleType") int titleType);
}
